package com.ly.heart.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ly.heart.domain.KingInventoryEntity;
import com.ly.heart.domain.dto.KingInventoryQueryDto;
import com.ly.heart.domain.dto.KingOutInventoryQueryDto;
import com.ly.heart.domain.vo.KingPurchaseInventoryVo;
import com.ly.heart.domain.vo.MenuKingInventoryMaterialVo;
import com.ly.heart.domain.vo.SaleInventoryKingVo;
import com.ly.heart.domain.vo.select.KingPurchaseInventorySelectVo;
import com.ly.heart.domain.vo.select.query.KingInventorySelectQueryDto;

/**
 * 金蝶-入库/出库单Mapper接口
 * @author cxl
 * @date 2024-07-13
 */
public interface KingInventoryMapper extends BaseMapper<KingInventoryEntity> {
    /**
     * 查询金蝶-入库/出库单
     * @param id 金蝶-入库/出库单ID
     * @return 金蝶-入库/出库单
     */
    public KingInventoryEntity selectKingInventoryEntityById (String id);

    /**
     * 查询金蝶-入库/出库单列表
     * @param kingInventoryEntity 金蝶-入库/出库单
     * @return 金蝶-入库/出库单集合
     */
    public List<KingInventoryEntity> selectKingInventoryEntityList (KingInventoryEntity kingInventoryEntity);

    /**
     * 新增金蝶-入库/出库单
     * @param kingInventoryEntity 金蝶-入库/出库单
     * @return 结果
     */
    public int insertKingInventoryEntity (KingInventoryEntity kingInventoryEntity);

    /**
     * 修改金蝶-入库/出库单
     * @param kingInventoryEntity 金蝶-入库/出库单
     * @return 结果
     */
    public int updateKingInventoryEntity (KingInventoryEntity kingInventoryEntity);

    /**
     * 删除金蝶-入库/出库单
     * @param id 金蝶-入库/出库单ID
     * @return 结果
     */
    public int deleteKingInventoryEntityById (String id);

    /**
     * 批量删除金蝶-入库/出库单
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteKingInventoryEntityByIds (String[] ids);

    /**
     * 查询总数
     * @return
     */
    Integer queryCount (String type);

    /**
     * 采购入库单选单接口
     * @param queryDto
     * @return
     */
    List<KingPurchaseInventorySelectVo> getKingInventorySelect (KingInventorySelectQueryDto queryDto);

    /**
     * 查询数量
     * @param queryDto
     * @return
     */
    Integer queryTotalCount (KingInventorySelectQueryDto queryDto);


    List<MenuKingInventoryMaterialVo> selectMenuSaleInventoryList (KingInventoryEntity kingInventoryEntity);

    Integer selectMenuSaleInventoryCount (KingInventoryEntity kingInventoryEntity);


    /**
     * 查询销售出库单详情
     * @param id
     * @return
     */
    KingInventoryEntity getInventoryById (String id);

    /**
     * 查询关联表的编码，送到金蝶
     * @param id
     * @return
     */
    SaleInventoryKingVo getInventoryCodeById ( String id);

}
